package com.IntelligentCommunity.es.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel("es文档查询参数")
public class EsDocQueryVo extends EsDocBaseVo{

    @ApiModelProperty(value = "query参数,查询自动补全时非必传",required = false)
    private Map<String,Object> queryObj;

    @ApiModelProperty(value = "全文检索关键字",required = false)
    private String keyWords;

    @ApiModelProperty(value = "全文检索关键字",required = false)
    private List<String> keyWordList;

    @ApiModelProperty("分页条件")
    private PageVo pageVo = new PageVo();

    @ApiModelProperty("检索字段")
    private List<String> searchFields;

    @ApiModelProperty("高亮字段，必须包含在searchFields，如果不传，默认对searchFields进行全部高亮")
    private List<String> highLightFields;

    @ApiModelProperty(value = "开始时间，用于时间区间查询",required = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "结束时间，用于时间区间查询",required = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "索引类型 1人脸 2车辆 3门禁",required = false)
    private Integer flag;

}
